package machine.received.controller;

import machine.received.service.ReceivedMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 接收消息controller
 *
 * @author zhanghui145
 * @date 2021/12/24 17:29
 * @since 1.0.0
 */
@Service
@RestController
public class ReceivedMsgController {

    @Autowired
    private ReceivedMsgService receivedMsgService;

    @PostMapping("/received")
    public boolean received(HttpServletRequest request) {
        receivedMsgService.receivedMsg(request);
        return true;
    }
}
